package com.fenghongzhang.day013.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.fenghongzhang.day013.R;
import com.fenghongzhang.day013.entity.Meizi;

import java.util.List;

public class MeiziAdapter extends BaseQuickAdapter<Meizi.DataBean, BaseViewHolder> {

    public MeiziAdapter(int layoutResId, @Nullable List<Meizi.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Meizi.DataBean iem) {
        helper.setText(R.id.rv_title,iem.getTitle());
        Glide.with(mContext).load(iem.getUrl()).into((ImageView) helper.getView(R.id.rv_img));
    }
}
